package com.hoshiibuy.dictionary.controller;

import com.hoshiibuy.dictionary.service.IDicInteresHobService;
import com.hoshiibuy.dictionary.entity.DicInteresHobVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author guangjinwei
 * @create 2019-04-18
 */
@RestController
@RequestMapping("dicIndCls/")
@Api(value = "兴趣爱好信息管理", tags = {"兴趣爱好信息操作接口"})
public class DicInteresHobController {


    @Autowired
    IDicInteresHobService dicInteresHobService;

    @RequestMapping(value = "/saveDicInteresHob", method = RequestMethod.POST)
    @ApiOperation(
            value = "保存兴趣爱好信息",
            notes = "保存兴趣爱好信息",
            produces = "application/json, application/xml",
            consumes = "application/json, application/xml")
    public void saveDicInteresHob(DicInteresHobVo dicInteresHobVo){

        dicInteresHobService.saveDicInteresHob(dicInteresHobVo);
    }

    @RequestMapping(value = "/findDicInteresHobList", method = RequestMethod.GET)
    @ApiOperation(
            value = "查询兴趣爱好信息",
            notes = "查询兴趣爱好信息",
            produces = "application/json, application/xml",
            consumes = "application/json, application/xml")
    public List<DicInteresHobVo> findDicInteresHobList(){

        return dicInteresHobService.findDicInteresHobList();
    }
}
